<?php
/**
 * Created by PhpStorm.
 * Author : D　Ｈ
 * Date: 2017/6/23
 * Time: 10:30
 */

namespace app\android\controller;
use app\api\logic\Topic as Topics;
use think\Request;
use tool\Common;

class Topic extends Base {
    //发表话题
    public function publishTopic(){
        return json((new Topics($this->request))->publishTopic());
    }

    //得到最新话题（所有话题）
    public function getNewTopic(){
        return json((new Topics($this->request))->getNewTopic());
    }

    //话题回复
    public function replyTopic(){
        return json((new Topics($this->request))->replyTopic());
    }

    //根据话题ID得到话题详细内容
    public function getDetailsByTopicID(){
        return json((new Topics($this->request))->getDetailsByTopicID());
    }

    //得到所有评论
    /*public function getAnswerListByTopicID(){
        return json((new Topics($this->request))->getAnswerListByTopicID());
    }*/

    //话题点赞
    public function thumbUpTopic(){
        return json((new Topics($this->request))->thumbUpTopic());
    }

    //取消话题点赞
    public function cancelThumbUp(){
        return json((new Topics($this->request))->cancelThumbUp());
    }

    //删除话题
    public function deleteTopic(){
        return json((new Topics($this->request))->deleteTopic());
    }

    //与我相关
    public function relatedForMe(){
        return json((new Topics($this->request))->relatedForMe());
    }

    //未回答话题
    public function notAnswer(){
        return json((new Topics($this->request))->notAnswer());
    }


}